home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / graphics / scalemd2.frm < prev    next >
Text File  |  1993-05-16  |  7KB  |  225 lines

  1. VERSION 2.00
  2. Begin Form Form2 
  3.    Caption         =   "Scalemode Setting"
  4.    ClientHeight    =   3840
  5.    ClientLeft      =   3690
  6.    ClientTop       =   2775
  7.    ClientWidth     =   3975
  8.    Height          =   4245
  9.    Left            =   3630
  10.    LinkMode        =   1  'Source
  11.    LinkTopic       =   "Form2"
  12.    ScaleHeight     =   3840
  13.    ScaleWidth      =   3975
  14.    Top             =   2430
  15.    Width           =   4095
  16.    Begin CommandButton cmdDone 
  17.       Caption         =   "&Done"
  18.       Height          =   495
  19.       Left            =   2160
  20.       TabIndex        =   18
  21.       Top             =   2760
  22.       Width           =   1215
  23.    End
  24.    Begin CommandButton cmdRescale 
  25.       Caption         =   "&Rescale"
  26.       Default         =   -1  'True
  27.       Height          =   495
  28.       Left            =   2160
  29.       TabIndex        =   17
  30.       Top             =   2040
  31.       Width           =   1215
  32.    End
  33.    Begin TextBox txtScale 
  34.       Height          =   375
  35.       Index           =   3
  36.       Left            =   3240
  37.       TabIndex        =   16
  38.       Top             =   1440
  39.       Width           =   615
  40.    End
  41.    Begin TextBox txtScale 
  42.       Height          =   375
  43.       Index           =   2
  44.       Left            =   3240
  45.       TabIndex        =   15
  46.       Top             =   1080
  47.       Width           =   615
  48.    End
  49.    Begin TextBox txtScale 
  50.       Height          =   375
  51.       Index           =   1
  52.       Left            =   3240
  53.       TabIndex        =   14
  54.       Top             =   720
  55.       Width           =   615
  56.    End
  57.    Begin TextBox txtScale 
  58.       Height          =   375
  59.       Index           =   0
  60.       Left            =   3240
  61.       TabIndex        =   13
  62.       Top             =   360
  63.       Width           =   615
  64.    End
  65.    Begin Frame Frame1 
  66.       Caption         =   "Scale Mode"
  67.       Height          =   3255
  68.       Left            =   120
  69.       TabIndex        =   0
  70.       Top             =   360
  71.       Width           =   1695
  72.       Begin OptionButton optScaleMode 
  73.          Caption         =   "Centimeters"
  74.          Height          =   375
  75.          Index           =   7
  76.          Left            =   120
  77.          TabIndex        =   8
  78.          Top             =   2760
  79.          Width           =   1335
  80.       End
  81.       Begin OptionButton optScaleMode 
  82.          Caption         =   "Millimeters"
  83.          Height          =   375
  84.          Index           =   6
  85.          Left            =   120
  86.          TabIndex        =   7
  87.          Top             =   2400
  88.          Width           =   1335
  89.       End
  90.       Begin OptionButton optScaleMode 
  91.          Caption         =   "Inches"
  92.          Height          =   375
  93.          Index           =   5
  94.          Left            =   120
  95.          TabIndex        =   6
  96.          Top             =   2040
  97.          Width           =   1335
  98.       End
  99.       Begin OptionButton optScaleMode 
  100.          Caption         =   "Character"
  101.          Height          =   375
  102.          Index           =   4
  103.          Left            =   120
  104.          TabIndex        =   5
  105.          Top             =   1680
  106.          Width           =   1335
  107.       End
  108.       Begin OptionButton optScaleMode 
  109.          Caption         =   "Pixels"
  110.          Height          =   375
  111.          Index           =   3
  112.          Left            =   120
  113.          TabIndex        =   4
  114.          Top             =   1320
  115.          Width           =   1455
  116.       End
  117.       Begin OptionButton optScaleMode 
  118.          Caption         =   "Points"
  119.          Height          =   375
  120.          Index           =   2
  121.          Left            =   120
  122.          TabIndex        =   3
  123.          Top             =   960
  124.          Width           =   1455
  125.       End
  126.       Begin OptionButton optScaleMode 
  127.          Caption         =   "Twips"
  128.          Height          =   375
  129.          Index           =   1
  130.          Left            =   120
  131.          TabIndex        =   2
  132.          Top             =   600
  133.          Width           =   1455
  134.       End
  135.       Begin OptionButton optScaleMode 
  136.          Caption         =   "User-defined"
  137.          Height          =   375
  138.          Index           =   0
  139.          Left            =   120
  140.          TabIndex        =   1
  141.          Top             =   240
  142.          Width           =   1455
  143.       End
  144.    End
  145.    Begin Label lblScale 
  146.       Caption         =   "Scale Height:"
  147.       Height          =   255
  148.       Index           =   3
  149.       Left            =   1920
  150.       TabIndex        =   12
  151.       Top             =   1560
  152.       Width           =   1215
  153.    End
  154.    Begin Label lblScale 
  155.       Caption         =   "Scale Width:"
  156.       Height          =   255
  157.       Index           =   2
  158.       Left            =   1920
  159.       TabIndex        =   11
  160.       Top             =   1200
  161.       Width           =   1215
  162.    End
  163.    Begin Label lblScale 
  164.       Caption         =   "Scale Top:"
  165.       Height          =   255
  166.       Index           =   1
  167.       Left            =   1920
  168.       TabIndex        =   10
  169.       Top             =   840
  170.       Width           =   1215
  171.    End
  172.    Begin Label lblScale 
  173.       Caption         =   "Scale Left"
  174.       Height          =   255
  175.       Index           =   0
  176.       Left            =   1920
  177.       TabIndex        =   9
  178.       Top             =   480
  179.       Width           =   1215
  180.    End
  181. End
  182. Dim SelScaleMode As Integer
  183.  
  184. Sub cmdDone_Click ()
  185.    End
  186. End Sub
  187.  
  188. Sub cmdRescale_Click ()
  189.     optScaleMode_Click SelScaleMode
  190. End Sub
  191.  
  192. Sub Form_Load ()
  193.     'Initialize Controls
  194.     Form2.txtScale(0).Text = Str$(frmScaleMode.picDraw.ScaleLeft)
  195.     Form2.txtScale(1).Text = Str$(frmScaleMode.picDraw.ScaleTop)
  196.     Form2.txtScale(2).Text = Str$(frmScaleMode.picDraw.ScaleWidth)
  197.     Form2.txtScale(3).Text = Str$(frmScaleMode.picDraw.ScaleHeight)
  198.  
  199.     Form2.optScaleMode(frmScaleMode.picDraw.ScaleMode).Value = True
  200. End Sub
  201.  
  202. Sub optScaleMode_Click (Index As Integer)
  203.     If Index = 0 Then
  204.         frmScaleMode.picDraw.ScaleLeft = Val(txtScale(0).Text)
  205.         frmScaleMode.picDraw.ScaleTop = Val(txtScale(1).Text)
  206.         frmScaleMode.picDraw.ScaleWidth = Val(txtScale(2).Text)
  207.         frmScaleMode.picDraw.ScaleHeight = Val(txtScale(3).Text)
  208.     End If
  209.     frmScaleMode.picDraw.ScaleMode = Index
  210.     oldCursorX = frmScaleMode.picDraw.ScaleLeft
  211.     oldCursorY = frmScaleMode.picDraw.ScaleTop
  212.     frmScaleMode.picDraw.Refresh
  213.     frmScaleMode.picXaxis.Refresh
  214.     frmScaleMode.picYAxis.Refresh
  215.     frmScaleMode.picDraw.Tag = ""
  216.     
  217.     Form2.txtScale(0).Text = Str$(frmScaleMode.picDraw.ScaleLeft)
  218.     Form2.txtScale(1).Text = Str$(frmScaleMode.picDraw.ScaleTop)
  219.     Form2.txtScale(2).Text = Str$(frmScaleMode.picDraw.ScaleWidth)
  220.     Form2.txtScale(3).Text = Str$(frmScaleMode.picDraw.ScaleHeight)
  221.  
  222.     SelScaleMode = Index
  223. End Sub
  224.  
  225.